from time import sleep
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction 

desired_capabilities = {
  "platformName": "Android",
  "platformVersion": "5.1.1",
  "deviceName": "62002"
}

driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_capabilities=desired_capabilities)
# 利用坐标定位
# driver.tap([(360,500)])
# sleep(20)
# driver.tap([(360,940)])

# 定位 美图秀秀
mt = driver.find_element_by_accessibility_id('美图秀秀')
# 选中美图秀秀，按住后移动到垃圾箱
TouchAction(driver).long_press(mt).move_to(x=130,y=90).release().perform()
sleep(20)
# 点击确定
TouchAction(driver).tap(x=600,y=735).perform().tap()